// 登录模块接口定义
export interface LoginParams {
  username: string
  password: string
  clientId: string
  grantType: string
  tenantId?: string
}

export interface LoginInfo {
  name: string
  avatar: string
  introduction: string
  accessToken: string
  refreshToken: string
  roles: string[]
  userInfo: UserInfo
  permissions: string[]
  menuType: string
}

export interface UserInfo {
  id?: number
  username: string
  name: string
  phone?: string
  nickname?: string
  logo?: string
  age?: number
  sex?: number
  idCard?: string
  email?: string
  accountStatusCd?: string
  userTagCd?: string
  lastLoginTime?: string
  createTime?: string
  updateTime?: string
}

export interface RegisterParams {
  username: string
  password: string
  tenantKey: string
  registerCode?: string
  businessCode?: string
  email?: string
  phone?: string
  name?: string
  nickname?: string
  sex?: number
  birthday?: string
  logo?: string
  address?: string
}

}

// 新的注册接口参数（基于后端UserInfoRegisterDTO）
export interface UserInfoRegisterDTO {
  /** 队伍ID */
  deptId?: number
  /** 微信登录code */
  wechatCode?: string
  /** 姓名 */
  name: string
  /** 昵称 */
  nickName?: string
  /** 头像 */
  avatar?: string
  /** 联系电话 */
  phone: string
  /** 身份证号 */
  identityCard?: string
  /** 身份证有效期开始 */
  identityStartDate?: string
  /** 身份证有效期截止 */
  identityEndDate?: string
  /** 护照号 */
  passportNumber?: string
  /** 保险状态 */
  insuranceStatus?: boolean
  /** 政治面貌 */
  politicsStatus?: string
  /** 血型 */
  bloodType?: string
  /** 性别 */
  sex?: string
  /** 生日 */
  birthday?: string
  /** 备注 */
  remark?: string
  /** 签名图片 */
  signatureImage?: string
  /** 身份证图片 */
  identityImage?: string
  /** 资料图片多个 */
  informationImage?: string
  /** 紧急联系人 */
  emergencyContact?: string
  /** 紧急联系人电话 */
  emergencyContactPhone?: string
  /** 医疗史 */
  medicalHistory?: string
  /** 过敏史 */
  allergiesHistory?: string
  /** 入队时间 */
  approveTime?: string
}

// 验证码相关接口定义
export interface CaptchaStatusResponse {
  enable: boolean
}

export interface SliderCaptchaParams {
  captchaType: string
}

export interface SliderCaptchaResponse {
  repCode: string
  repData: {
    originalImageBase64: string
    jigsawImageBase64: string
    secretKey: string
    token: string
  }
  repMsg: string
  success: boolean
}

export interface VerifyCaptchaParams {
  captchaType: string
  pointJson: string
  token: string
}

export interface VerifyCaptchaResponse {
  repCode: string
  repData: {
    captchaVerification: string
  }
  repMsg: string
  success: boolean
}

// 租户相关接口定义
export interface TenantEnableStatusResponse {
  enable: boolean
}

// 为了保持向后兼容性，导出类型别名
export interface ILogin {
  LoginParams: LoginParams
  LoginInfo: LoginInfo
  UserInfo: UserInfo
  RegisterParams: RegisterParams
}

export interface ICaptcha {
  CaptchaStatusResponse: CaptchaStatusResponse
  SliderCaptchaParams: SliderCaptchaParams
  SliderCaptchaResponse: SliderCaptchaResponse
  VerifyCaptchaParams: VerifyCaptchaParams
  VerifyCaptchaResponse: VerifyCaptchaResponse
}

export interface ITenant {
  TenantEnableStatusResponse: TenantEnableStatusResponse
}
